
/**
 * @author Team 29
 * This class documents a user's invoice within the database.
 *
 */
public class Invoice {
	public String reason;
	public String price;

	public Invoice(String reason, String price){
		this.reason = reason;
		this.price = price;
	}

	public String toString(){
		return reason + "\t" + price;
	}
	public static Invoice fromString(String invoice){
		try{
			String[] args = invoice.split("\t");
			return new Invoice(args[0],args[1]);
		}
		catch(Exception e){
			Logger.log("ERROR PARSING INVOICE");
			return null;
		}
	}
}
